﻿
using System.Threading.Tasks;

namespace Red.Core.Extensions
{
    public static class TaskExtensions
    {
        /// <summary>
        ///     This method is to shut up a compiler warning: "Because this call is not awaited (...) Consider applying the 'await' operator (...)"
        ///     for the (perfectly valid) cases when we DO NOT want to await for the result (for example, just to initiate a long background
        ///     process of fetching the value). Idea taken from this thread:
        ///     http://stackoverflow.com/questions/14903887/warning-this-call-is-not-awaited-execution-of-the-current-method-continues
        /// </summary>
        public static void DoNotAwait( this Task task ) { }
    }
}
